IF EXISTS ( SELECT  *
            FROM    dbo.sysobjects
            WHERE   id = OBJECT_ID(N'CGO_AccountLog')
                    AND OBJECTPROPERTY(id, N'IsTable') = 1 ) 
  BEGIN
    DROP TABLE dbo.CGO_AccountLog
  END


CREATE TABLE [dbo].[CGO_AccountLog]
  (
    [AccountLogID] [int] NOT NULL IDENTITY(1, 1),
    [UserID] [int] NOT NULL ,
    [PortalID] [int] NOT NULL ,
    [Action] [nvarchar](100) NULL ,
    [TokenBefore] [money] NULL ,
    [TokenAfter] [money] NULL ,
    [LogTime] [datetime] NOT NULL
  )
ON
  [PRIMARY]
  
ALTER TABLE [dbo].[CGO_AccountLog] ADD CONSTRAINT [PK_CGO_AccountLog] PRIMARY KEY CLUSTERED  ([AccountLogID]) ON [PRIMARY]
GO  